<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="/css/home.css">
</head>
<body>
    <!-- 常见赋值命令 -->
    <p>${name}</p>
    <!--
        list、break指令
        tem_index:当前变量的索引值.
        item_has_next:是否存在下一个对象.
    -->
     <#list ["星期一","星期二","星期三","星期四","星期五","星期六"] as x>
         ${x_index + 1}.${x}
         <#if x="星期四"><#break></#if>
         <#if x_has_next>,</#if>
     </#list>
     <!-- 宏macro -->
        <#macro one>
        <p style="font-size: x-small"> Hello Word!</p>
        </#macro>
        <@one></@one>
     <!-- =======================================-->
        <#macro two person>
        <p style="font-size: x-small"> Hello ${person}!</p>
        </#macro>
        <@two person="Word"/>  <@two person="fulin"/>
     <!-- =======================================-->
        <#macro three person size>
        <p style="font-size: ${size}" > Hello ${person}!</>
        </#macro>
        <@three size="26px" person="Word"></@three>
     <!-- ================空值============-->
       <hr>
       <#if empty??><b>${empty!"abc"}</b></#if>
     <!-- ===========字符串类型 声明变量========-->
       <hr>
      <#assign temp = "happy fish"  />
      <b>${temp}</b>
     <!-- ===========字符串类型 声明变量========-->
        <hr>
      <#assign number = 111  />
       <b>${number}</b>
     <!-- ===========哈希表类型 声明变量========-->
        <hr>
      <#assign map = {"name":"green mouse", "price":150} />
       <b>${map.name}</b>
     <!-- ===========序列类型 声明变量========-->
        <hr>
      <#assign  nums=[1,2,3,4,5,77,8,99] />
       <b>${nums[0]}</b>
     <!-- ===========时间类型 声明变量========-->
        <hr>
      <#assign date1 = "2018-09-22"?date("yyyy-MM-dd") />
      <#assign date2 ="16:34:43"?time("HH:mm:ss") />
      <#assign date3 = "2018-09-22 17:23:45"?datetime("yyyy-MM-dd HH:mm:ss") />
        <b>${date1},</b>
        <b>${date2},</b>
        <b>${date3}</b>
     <!-- ===========布尔类型 声明变量========-->
        <hr>
      <#assign  flag=true  />
        <#if flag>fulinlin</#if>
</body>
</html>